package com.foundersoftware.commons.organization.model;

/**
 *
 * @author wuhongjun@routon.com
 * @version 3.0
 */
public class Role extends AbstractOrganizationObject  {

	private static final long serialVersionUID = -6120820543909514937L;
	private RoleType type = null;
	private OrganizationUnit organizationUnit;
	private WorkGroup workGroup;
	
	/* This field is the flag whether the <code>Role<code> belongs to an administrative
	 * organization. 
	 */
	private boolean isBelongToOrg  = true;
	
	/**
	 * If the field <code>isBelongToOrg<code> is false,then This field <code>belongToWG<code>
	 * must not be null. 
	 */
    private WorkGroup belongToWG = null;
    public WorkGroup getBelongToWG() {
	    return belongToWG;
    }
    public void setBelongToWG(WorkGroup belongToWG) {
	     this.belongToWG = belongToWG;
    }
	protected boolean isBelongToOrg() {
		return isBelongToOrg;
	}
	protected void setBelongToOrg(boolean isBelongToOrg) {
		this.isBelongToOrg = isBelongToOrg;
	}
	protected RoleType getType() {
		return type;
	}
	protected void setType(RoleType type) {
		this.type = type;
	}
	public OrganizationUnit getOrganizationUnit() {
		return organizationUnit;
	}
	public void setOrganizationUnit(OrganizationUnit organizationUnit) {
		this.organizationUnit = organizationUnit;
	}
	public WorkGroup getWorkGroup() {
		return workGroup;
	}
	public void setWorkGroup(WorkGroup workGroup) {
		this.workGroup = workGroup;
	}
}
